# Audion canonical .gitignore - whitelist form
#
# This is the ".gitmusthave" that git does not have: everything is forbidden,
# and only what is named gets in. The blacklist form lives beside this file as
# gitignore_template.txt; both are derived from the Hub Manager projection
# profile `audion_python_project_projection`, which itself works by inclusion
# (`require_include_filter: true`).
#
# Which to use:
#
#   whitelist (this file)  a new kind of rubbish cannot slip in, because
#                          nothing is allowed by default. The cost is that a
#                          genuinely new file type must be added here once.
#
#   blacklist              nothing to maintain, but every new payload type
#                          gets in until somebody notices. That is how
#                          Tools\deno\deno.exe reached history twice.
#
# Prefer this one. The list below already covers every language and manifest
# the projection accepts, so "adding a type once" is rare in practice.
#
# How it works: the first two lines forbid everything, including directories.
# `!*/` re-opens directories so git can descend into them - without it nothing
# below the root would ever be seen.

*
!*/

# --- documents and text ---
!*.md
!*.markdown
!*.txt
!*.rst

# --- code ---
!*.py
!*.pyw
!*.pyi
!*.ipynb
!*.cmd
!*.bat
!*.ps1
!*.psm1
!*.psd1
!*.sh
!*.js
!*.ts
!*.tsx
!*.jsx
!*.vue
!*.svelte
!*.c
!*.cc
!*.cpp
!*.cxx
!*.h
!*.hh
!*.hpp
!*.hxx
!*.cs
!*.go
!*.rs
!*.java
!*.kt
!*.kts
!*.rb
!*.php
!*.lua
!*.swift
!*.dart
!*.scala
!*.sql

# --- configuration and data ---
!*.json
!*.yaml
!*.yml
!*.toml
!*.ini
!*.cfg
!*.conf
!*.xml
!*.csv
!*.html
!*.htm
!*.css

# --- build and dependency manifests ---
!Dockerfile
!compose.yml
!compose.yaml
!docker-compose.yml
!docker-compose.yaml
!Makefile
!makefile
!CMakeLists.txt
!*.cmake
!*.mk
!justfile
!Taskfile.yml
!Taskfile.yaml
!requirements*.txt
!requirements*.in
!pyproject.toml
!setup.cfg
!setup.py
!Pipfile
!Pipfile.lock
!poetry.lock
!uv.lock
!package.json
!package-lock.json
!pnpm-lock.yaml
!yarn.lock
!Cargo.toml
!Cargo.lock
!go.mod
!go.sum
!Gemfile
!Gemfile.lock

# --- repository and tooling metadata ---
!.gitignore
!.gitattributes
!.gitmodules
!.git-blame-ignore-revs
!.editorconfig
!.dockerignore
!.npmrc
!.prettierrc
!.prettierrc.*
!.eslintrc
!.eslintrc.*
!.flake8
!.pylintrc
!mypy.ini
!tox.ini
!pytest.ini
!CODEOWNERS

# --- legal and project documents ---
!LICENSE*
!LICENCE*
!NOTICE*
!COPYING*
!AUTHORS*
!CONTRIBUTING*
!SECURITY*
!CHANGELOG*
!README*

# --- examples of environment files; never the real ones ---
!.env.example
!.env.sample

# ---------------------------------------------------------------------------
# Re-forbidden, because a whitelist by extension is not enough on its own.
#
# The build downloads a Python runtime, and site-packages is thousands of .py
# files - every one of them allowed by the list above. Measured: without these
# lines `runtime\Lib\site.py` walks straight into the index. The same goes for
# the wheelhouse and for anything else a build fetches.
#
# `licenses/` holds .txt and .json, which the list above allows too - but the
# pack is regenerated by Audion Build Licenses on every release and would churn
# in history. THIRD_PARTY_NOTICES alone is half a megabyte per build.
# ---------------------------------------------------------------------------
# Whole folders, and no .gitkeep kept beside them: `install\init_folders.cmd`
# recreates the tree, and it reaches depths a marker pair never could -
# Tools\ffmpeg\bin, Tools\7zip\bin, report\gui_smoke_screenshots. It runs from
# cleanup_project.cmd, cli\run-init-dir.cmd and install\Build_Portable_Env_Build.cmd,
# so a clone has its folders back after the first cleanup or build. Present in 28
# of 31 projects; the three Build tools create their own folders in code.
# Storing markers here too would give one fact two owners. The script is the owner.
runtime/
wheelhouse/
Tools/
tools/
install/download/
install/downloads/
logs/
output/
report/
release/
work/
workspace/
input/
data/cache/
licenses/

# No marker needed: these are never expected to exist in a fresh clone.
node_modules/
._runtime/
_pwsh_tmp/
system_core/powershell/
temp/
tmp/
backup/
release_manifest.json
_archives_public_git/
_archives_private_git/
_archives_public_full/
_archives_private_full/
_audion_docs/

# Secrets are .txt and .json shaped too. Never. Whole folders, like above -
# init_folders.cmd creates them where a project keeps keys.
config/keys/
config/ssh/
config/rclone/
.env
.env.*
!.env.example
!.env.sample
*.local.json
*credential*

# Generated documents: rebuilt by Audion Build PDF Render, shipped in archives.
Docs/PDF/
docs/PDF/

# ---------------------------------------------------------------------------
# The downloaded editor, kept here so the scripts can be tested against a real
# installation. 3.5 GB and 20269 files, and the extension folders are full of
# .js, .py and .json - all of which the list above admits. Without this line an
# entire copy of VS Code walks into the repository.
#
# The installer and the portable zip beside it are refused already: .exe and
# .zip are not on the allow list.
# ---------------------------------------------------------------------------
VSCode/
